1. Field of the Invention
The present general inventive concept relates to an image decoding method, and more particularly, to a decoding method of detecting a transmission error region and recovering data having no transmission error and a decoding apparatus using the same.
2. Description of the Related Art
Since a large amount of data is necessary to process images, data compression is indispensable for effectively processing images. For data compression, there are various standards, such as joint photographic experts group (JPEG), moving picture experts group (MPEG)-1, MPEG-2, MPEG-4, H.261, H.263, H.264, etc. In addition, on-going standardization work for data compression includes additional functions, such as virtual reality and authentication.
According to conventional data compression standards, an encoder encodes digital image data by segmenting the digital image data into blocks of a certain length. The encoded data is transmitted to a decoder, and then decoded according to the same standard that is used to encode the data blocks. Huffman's coding and arithmetic coding are widely used as encoding/decoding methods.
The arithmetic coding method uses a probability reference line and an offset extending between 0 and 1, and is a method of encoding symbols into floating point numbers so that each symbol falls within a certain range in part of the offset according to their probabilities. Once the offset and the range are defined, all symbols are encoded into particular floating point numbers. The encoded floating point numbers are transmitted to the decoder and then decoded according to the same principle.
Problems may arise as a result of errors that occur during transmission. FIG. 1 illustrates a slice diagram for describing a method of processing a transmission error according to a conventional decoding method.
FIG. 1 illustrates an example of a slice encoded by using a context adaptive binary arithmetic coding (CABAC) according to the H.264 standard. The slice includes a header and a plurality of macro blocks. A conventional decoder detects an exceptional state D or an undefined state caused by a transmission error E in bits or packets during a decoding process of the encoded slice, and then processes the transmission error E. In other words, in some instances in which the exceptional state D is detected during the decoding process, the decoder determines that the transmission error E has occurred such that the entire slice is discarded. In this case, the discarded slice includes the macro blocks (from a start point of the slice to a position of the transmission error E) which have been accurately decoded without any transmission error, and the macro blocks (behind a position of the exceptional state D) which are to be decoded after the errored macro block, as well as the macro blocks having the transmission error E.
A conventional decoder does not provide a method of detecting an accurate position of the transmission error E and thus can not distinguish between a correctly decoded macro block and an errored macro block. Thus, the entire slice including the correctly decoded regions (from the start point of the slice to the position of the transmission error E) must be discarded, because it may be impossible to recover the correctly decoded regions. If the exceptional state D occurs due to the transmission error E in one bit located near the end of the slice, all the previously decoded correct macro blocks are discarded due to a one bit error.
Furthermore, since a transmission error is not detected in an actual transmission error region E but in a region that follows the exceptional state D after the subsequent decoding is progressed, it may be impossible to detect the actual transmission error region. Accordingly, the decoding is unnecessarily progressed after the transmission error occurs, thereby causing a waste of time and resources.